<div>
    <select id="sid" name="sid">
        <%for(var id in ret.server){%>
        <option value="<%=id%>"><%=ret.server[id]%></option>
        <%}%>
    </select>
</div>
<script>
    var sid = "<%=ret.sid%>"
    $("#sid").val(sid);
    $("#sid").on("change",reload);
    function reload() {
        cosjs.reload("?sid="+$("#sid").val());
    }
    var option = {
        url : GURL(handle, 'page?sid='+sid),
        editurl : GURL(handle, 'save?sid='+sid),
        colModel : [
            {label: '_id', name: '_id', width: 180,key:true, editable: false,sortable:true, hidden:true,resize:false,search:true,fixed:true},
            {label: 'uid', name: 'uid', width: 180,key:false, editable: true,sortable:true, resize:false,search:true,fixed:true},
			{label: '角色名', name: 'name',width: 180, editable: false, sortable:false,hidden:false,resize:true,fixed:false,search:false},
			{label: '查封时刻', name: 'time',width: 180, editable: false, sortable:false,hidden:false,resize:true,fixed:false,search:false,formatter:cosjs.jqgrid.timeFormat},
			{label: '备注', name: 'desc',width: 180, editable: true, sortable:false,hidden:false,resize:true,fixed:false,search:false},
			{label: '推送消息', name: 'msg',width: 180, editable: true, sortable:false,hidden:false,resize:true,fixed:false,search:false},
        ]
    }
    $(document).ready(function(){
        cosjs_create_jqgrid(option);
    });
</script>
